<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>General Index</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'General Index' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../inbuildn.html">Inbuild Modules</a></li><li><a href="index.html">supervisor</a></li><li><a href="index.html#7">Chapter 7: Extension Management</a></li><li><b>General Index</b></li></ul></div>
<p class="purpose">To render a documentation index into HTML form.</p>

<ul class="toc"><li><a href="7-gi.html#SP2">&#167;2. Utilities</a></li><li><a href="7-gi.html#SP4">&#167;4. Alphabet rows</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>Having accumulated the lemmas, it's time to sort them and write the index
as it will be seen by the reader.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexes::write_example_index</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">Indexes::write_example_index</span></span>:<br/>Documentation Renderer - <a href="7-dr.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">compiled_documentation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cd</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP1" class="function-link"><span class="function-syntax">Indexes::write_general_index_inner</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexes::write_general_index</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">Indexes::write_general_index</span></span>:<br/>Documentation Renderer - <a href="7-dr.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">compiled_documentation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cd</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP1" class="function-link"><span class="function-syntax">Indexes::write_general_index_inner</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexes::write_general_index_inner</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">compiled_documentation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cd</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">just_examples</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">NL</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">index_lemma</span><span class="plain-syntax"> **</span><span class="identifier-syntax">lemma_list</span><span class="plain-syntax"> = </span><a href="7-id.html#SP2" class="function-link"><span class="function-syntax">IndexingData::sort</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cd</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">NL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_1" class="named-paragraph-link"><span class="named-paragraph">Condense single-line categories</span><span class="named-paragraph-number">1.1</span></a></span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"div"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"generalindex\""</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2" class="named-paragraph-link"><span class="named-paragraph">Render the index in sorted order</span><span class="named-paragraph-number">1.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"div"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP1_1" class="paragraph-anchor"></a><b>&#167;1.1. </b>At this point we rely on two facts: the lemma list is sorted, and we've
created the ancestors of every term. So "X" (or "X: I") cannot be followed
by "Y: J" without a "Y" in between.
Given that, we can find condensable lines by looking for peaks: a lemma
whose term-length is longer than both the one before and the one after.
In that case, the preceding lemma can be skipped *if* it has no references
of its own to display.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Condense single-line categories</span><span class="named-paragraph-number">1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">NL</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">index_lemma</span><span class="plain-syntax"> *</span><span class="identifier-syntax">il</span><span class="plain-syntax"> = </span><span class="identifier-syntax">lemma_list</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">];</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lemma_source</span><span class="plain-syntax"> != </span><span class="constant-syntax">BODY_LEMMASOURCE</span><span class="plain-syntax">) </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">depth</span><span class="plain-syntax"> = </span><a href="7-it.html#SP5" class="function-link"><span class="function-syntax">IndexTerms::subterms</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">term</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">nextdepth</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax">+1&lt;</span><span class="identifier-syntax">NL</span><span class="plain-syntax">) </span><span class="identifier-syntax">nextdepth</span><span class="plain-syntax"> = </span><a href="7-it.html#SP5" class="function-link"><span class="function-syntax">IndexTerms::subterms</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_list</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">+1]-&gt;</span><span class="element-syntax">term</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">nextdepth</span><span class="plain-syntax"> &gt;= </span><span class="identifier-syntax">depth</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">continue</span><span class="plain-syntax">; </span><span class="comment-syntax"> next line is in the same category</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">excount</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax">-</span><span class="identifier-syntax">excount</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">index_lemma</span><span class="plain-syntax"> *</span><span class="identifier-syntax">previl</span><span class="plain-syntax"> = </span><span class="identifier-syntax">lemma_list</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">-</span><span class="identifier-syntax">excount</span><span class="plain-syntax">];</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">previl</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lemma_source</span><span class="plain-syntax"> != </span><span class="constant-syntax">BODY_LEMMASOURCE</span><span class="plain-syntax">) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="comment-syntax"> don't squash a category line with references</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="7-il.html#SP12" class="function-link"><span class="function-syntax">IndexLemmas::has_references</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">previl</span><span class="plain-syntax">)) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prevdepth</span><span class="plain-syntax"> = </span><a href="7-it.html#SP5" class="function-link"><span class="function-syntax">IndexTerms::subterms</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">previl</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">term</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="comment-syntax"> don't squash a line that isn't a category ancestor of this one</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prevdepth</span><span class="plain-syntax"> != </span><span class="identifier-syntax">depth</span><span class="plain-syntax">-</span><span class="identifier-syntax">excount</span><span class="plain-syntax">) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="comment-syntax"> don't squash a category line if the upcoming line is in the same category</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">prevdepth</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">nextdepth</span><span class="plain-syntax">) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="comment-syntax"> okay, squash it, and increase the show count of the current line</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">excount</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">previl</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">categories_to_show</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">categories_to_show</span><span class="plain-syntax"> = </span><span class="identifier-syntax">excount</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2" class="paragraph-anchor"></a><b>&#167;1.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Render the index in sorted order</span><span class="named-paragraph-number">1.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><a href="7-gi.html#SP5" class="function-link"><span class="function-syntax">Indexes::alphabet_row</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"table"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"indextable\""</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">current_incipit</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">NL</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">index_lemma</span><span class="plain-syntax"> *</span><span class="identifier-syntax">il</span><span class="plain-syntax"> = </span><span class="identifier-syntax">lemma_list</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">];</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">just_examples</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lemma_source</span><span class="plain-syntax"> == </span><span class="constant-syntax">BODY_LEMMASOURCE</span><span class="plain-syntax">)) </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((!</span><span class="identifier-syntax">just_examples</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lemma_source</span><span class="plain-syntax"> == </span><span class="constant-syntax">EG_ALT_LEMMASOURCE</span><span class="plain-syntax">)) </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">incipit</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::get_first_char</span><span class="plain-syntax">(</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">sorting_key</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Characters::isalpha</span><span class="plain-syntax">(</span><span class="identifier-syntax">incipit</span><span class="plain-syntax">)) </span><span class="identifier-syntax">incipit</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Characters::toupper</span><span class="plain-syntax">(</span><span class="identifier-syntax">incipit</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">incipit</span><span class="plain-syntax"> = </span><span class="character-syntax">'#'</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">incipit</span><span class="plain-syntax"> != </span><span class="identifier-syntax">current_incipit</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">current_incipit</span><span class="plain-syntax"> != </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_2" class="named-paragraph-link"><span class="named-paragraph">End a block of the index</span><span class="named-paragraph-number">1.2.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">current_incipit</span><span class="plain-syntax"> = </span><span class="identifier-syntax">incipit</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><a href="7-gi.html#SP5" class="function-link"><span class="function-syntax">Indexes::note_letter</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="identifier-syntax">current_incipit</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_1" class="named-paragraph-link"><span class="named-paragraph">Start a block of the index</span><span class="named-paragraph-number">1.2.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_3" class="named-paragraph-link"><span class="named-paragraph">Place an anchor for the index entry</span><span class="named-paragraph-number">1.2.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4" class="named-paragraph-link"><span class="named-paragraph">Render an index entry</span><span class="named-paragraph-number">1.2.4</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">current_incipit</span><span class="plain-syntax"> != </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_2" class="named-paragraph-link"><span class="named-paragraph">End a block of the index</span><span class="named-paragraph-number">1.2.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"table"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP5" class="function-link"><span class="function-syntax">Indexes::alphabet_row</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_1" class="paragraph-anchor"></a><b>&#167;1.2.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Start a block of the index</span><span class="named-paragraph-number">1.2.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN</span><span class="plain-syntax">(</span><span class="string-syntax">"tr"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"td"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"letterblock\""</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">inc</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">current_incipit</span><span class="plain-syntax"> == </span><span class="character-syntax">'#'</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">inc</span><span class="plain-syntax">, </span><span class="string-syntax">"NN"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">inc</span><span class="plain-syntax">, </span><span class="identifier-syntax">current_incipit</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::anchor</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">inc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP6" class="function-link"><span class="function-syntax">Indexes::majuscule_heading</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="identifier-syntax">inc</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">inc</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"td"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN</span><span class="plain-syntax">(</span><span class="string-syntax">"td"</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2">&#167;1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_2" class="paragraph-anchor"></a><b>&#167;1.2.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">End a block of the index</span><span class="named-paragraph-number">1.2.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"td"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"tr"</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2">&#167;1.2</a> (twice).</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_3" class="paragraph-anchor"></a><b>&#167;1.2.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Place an anchor for the index entry</span><span class="named-paragraph-number">1.2.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">anc</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">anc</span><span class="plain-syntax">, </span><span class="string-syntax">"l%d"</span><span class="plain-syntax">, </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">allocation_id</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::anchor</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">anc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">anc</span><span class="plain-syntax">)</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2">&#167;1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4" class="paragraph-anchor"></a><b>&#167;1.2.4. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Render an index entry</span><span class="named-paragraph-number">1.2.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">categories_to_show</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">depth</span><span class="plain-syntax"> = </span><a href="7-it.html#SP5" class="function-link"><span class="function-syntax">IndexTerms::subterms</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">term</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">depth</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"no indexing categories"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">IFM_example</span><span class="plain-syntax"> *</span><span class="identifier-syntax">EG</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_1" class="named-paragraph-link"><span class="named-paragraph">Find example relevant to this entry</span><span class="named-paragraph-number">1.2.4.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">indent</span><span class="plain-syntax"> = </span><span class="constant-syntax">4</span><span class="plain-syntax">*(</span><span class="identifier-syntax">depth</span><span class="plain-syntax"> - </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">categories_to_show</span><span class="plain-syntax">); </span><span class="comment-syntax"> measured in em-spaces</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"p"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"indexentry\" style=\"margin-left: %dem;\""</span><span class="plain-syntax">, </span><span class="identifier-syntax">indent</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">ccount</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">catnum</span><span class="plain-syntax"> = </span><span class="identifier-syntax">depth</span><span class="plain-syntax"> - </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">categories_to_show</span><span class="plain-syntax">; </span><span class="identifier-syntax">catnum</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">depth</span><span class="plain-syntax">; </span><span class="identifier-syntax">catnum</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ccount</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">", "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_2" class="named-paragraph-link"><span class="named-paragraph">Render one category</span><span class="named-paragraph-number">1.2.4.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">ccount</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&amp;nbsp;&amp;nbsp;"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">lc</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_3" class="named-paragraph-link"><span class="named-paragraph">Render the references</span><span class="named-paragraph-number">1.2.4.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_4" class="named-paragraph-link"><span class="named-paragraph">Render the cross-references</span><span class="named-paragraph-number">1.2.4.4</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"p"</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2">&#167;1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_1" class="paragraph-anchor"></a><b>&#167;1.2.4.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Find example relevant to this entry</span><span class="named-paragraph-number">1.2.4.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lemma_source</span><span class="plain-syntax"> != </span><span class="constant-syntax">BODY_LEMMASOURCE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">index_reference</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ref</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">ref</span><span class="plain-syntax">, </span><span class="reserved-syntax">index_reference</span><span class="plain-syntax">, </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">references</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ref</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">posn</span><span class="plain-syntax">.</span><span class="element-syntax">example</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">EG</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ref</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">posn</span><span class="plain-syntax">.</span><span class="element-syntax">example</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4">&#167;1.2.4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_2" class="paragraph-anchor"></a><b>&#167;1.2.4.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Render one category</span><span class="named-paragraph-number">1.2.4.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">indexing_category</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ic</span><span class="plain-syntax"> = </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">term</span><span class="plain-syntax">.</span><span class="element-syntax">categories</span><span class="plain-syntax">[</span><span class="identifier-syntax">catnum</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ic</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"no indexing category"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">itext</span><span class="plain-syntax"> = </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">term</span><span class="plain-syntax">.</span><span class="element-syntax">texts</span><span class="plain-syntax">[</span><span class="identifier-syntax">catnum</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">itext</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"no indexing text"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_2_1" class="named-paragraph-link"><span class="named-paragraph">Resolve backslash escapes in plain text</span><span class="named-paragraph-number">1.2.4.2.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_bracketed</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_2_2" class="named-paragraph-link"><span class="named-paragraph">Deal with unescaped brackets if the category makes them significant</span><span class="named-paragraph-number">1.2.4.2.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_2_3" class="named-paragraph-link"><span class="named-paragraph">Restore any escaped round brackets</span><span class="named-paragraph-number">1.2.4.2.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_2_4" class="named-paragraph-link"><span class="named-paragraph">Render the lemma text</span><span class="named-paragraph-number">1.2.4.2.4</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP1_2_4_2_5" class="named-paragraph-link"><span class="named-paragraph">Render the category gloss</span><span class="named-paragraph-number">1.2.4.2.5</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">)</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4">&#167;1.2.4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_2_1" class="paragraph-anchor"></a><b>&#167;1.2.4.2.1. </b>Backslash before a character makes it literal. In particular we reassign
escaped open and close brackets to make them impossible to confuse with
unescaped ones:
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">SAVED_OPEN_BRACKET</span><span class="plain-syntax"> </span><span class="constant-syntax">0x0086</span><span class="plain-syntax">  </span><span class="comment-syntax"> Unicode "start of selected area"</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">SAVED_CLOSE_BRACKET</span><span class="plain-syntax"> </span><span class="constant-syntax">0x0087</span><span class="plain-syntax"> </span><span class="comment-syntax"> Unicode "end of selected area"</span>
</pre>
<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Resolve backslash escapes in plain text</span><span class="named-paragraph-number">1.2.4.2.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">plain_text</span><span class="plain-syntax"> = </span><span class="identifier-syntax">itext</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0, </span><span class="identifier-syntax">L</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">plain_text</span><span class="plain-syntax">); </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">L</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::get_at</span><span class="plain-syntax">(</span><span class="identifier-syntax">plain_text</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'\\'</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">n</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::get_at</span><span class="plain-syntax">(</span><span class="identifier-syntax">plain_text</span><span class="plain-syntax">, ++</span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">n</span><span class="plain-syntax"> == </span><span class="character-syntax">'('</span><span class="plain-syntax">) </span><span class="identifier-syntax">n</span><span class="plain-syntax"> = </span><span class="constant-syntax">SAVED_OPEN_BRACKET</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">n</span><span class="plain-syntax"> == </span><span class="character-syntax">')'</span><span class="plain-syntax">) </span><span class="identifier-syntax">n</span><span class="plain-syntax"> = </span><span class="constant-syntax">SAVED_CLOSE_BRACKET</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">, </span><span class="identifier-syntax">n</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">, </span><span class="identifier-syntax">c</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP3" class="function-link"><span class="function-syntax">Indexes::escape_HTML_characters_in</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4_2">&#167;1.2.4.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_2_2" class="paragraph-anchor"></a><b>&#167;1.2.4.2.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Deal with unescaped brackets if the category makes them significant</span><span class="named-paragraph-number">1.2.4.2.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">match_results</span><span class="plain-syntax"> </span><span class="identifier-syntax">mr</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Regexp::create_mr</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"(%c*?)%(%(%+ %+%)%)(%c*)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Str::clear</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="string-syntax">"%S&lt;span class=\"index%Sbracketed\"&gt;%c+ +%c&lt;/span&gt;%S"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], </span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_name</span><span class="plain-syntax">, </span><span class="constant-syntax">SAVED_OPEN_BRACKET</span><span class="plain-syntax">, </span><span class="constant-syntax">SAVED_CLOSE_BRACKET</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1]);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"(%c*?)%(%(%- %-%)%)(%c*)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Str::clear</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="string-syntax">"%S&lt;span class=\"index%Sbracketed\"&gt;%c- -%c&lt;/span&gt;%S"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], </span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_name</span><span class="plain-syntax">, </span><span class="constant-syntax">SAVED_OPEN_BRACKET</span><span class="plain-syntax">, </span><span class="constant-syntax">SAVED_CLOSE_BRACKET</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1]);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_unbracketed</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="plain-syntax">, </span><span class="constant-syntax">SAVED_OPEN_BRACKET</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_unbracketed</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="constant-syntax">SAVED_CLOSE_BRACKET</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Regexp::match</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">, </span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">, </span><span class="identifier-syntax">U</span><span class="string-syntax">"(%c*?)%((%c*?)%)(%c*)"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Str::clear</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="string-syntax">"%S&lt;span class=\"index%Sbracketed\"&gt;%S%S%S&lt;/span&gt;%S"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[0], </span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">L</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[1], </span><span class="identifier-syntax">R</span><span class="plain-syntax">, </span><span class="identifier-syntax">mr</span><span class="plain-syntax">.</span><span class="identifier-syntax">exp</span><span class="plain-syntax">[2]);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Regexp::dispose_of</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">mr</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4_2">&#167;1.2.4.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_2_3" class="paragraph-anchor"></a><b>&#167;1.2.4.2.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Restore any escaped round brackets</span><span class="named-paragraph-number">1.2.4.2.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_THROUGH_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">pos</span><span class="plain-syntax">, </span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">d</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::get</span><span class="plain-syntax">(</span><span class="identifier-syntax">pos</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">d</span><span class="plain-syntax"> == </span><span class="constant-syntax">SAVED_OPEN_BRACKET</span><span class="plain-syntax">) </span><span class="identifier-syntax">Str::put</span><span class="plain-syntax">(</span><span class="identifier-syntax">pos</span><span class="plain-syntax">, </span><span class="character-syntax">'('</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">d</span><span class="plain-syntax"> == </span><span class="constant-syntax">SAVED_CLOSE_BRACKET</span><span class="plain-syntax">) </span><span class="identifier-syntax">Str::put</span><span class="plain-syntax">(</span><span class="identifier-syntax">pos</span><span class="plain-syntax">, </span><span class="character-syntax">')'</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4_2">&#167;1.2.4.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_2_4" class="paragraph-anchor"></a><b>&#167;1.2.4.2.4. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Render the lemma text</span><span class="named-paragraph-number">1.2.4.2.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lemma_source</span><span class="plain-syntax"> == </span><span class="constant-syntax">EG_NAME_LEMMASOURCE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_OPEN</span><span class="plain-syntax">(</span><span class="string-syntax">"b"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">EG</span><span class="plain-syntax">) </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"a"</span><span class="plain-syntax">, </span><span class="string-syntax">"href=\"%S\""</span><span class="plain-syntax">, </span><span class="identifier-syntax">EG</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">URL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"span"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"index%S\""</span><span class="plain-syntax">, </span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">lemma_wording</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"span"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">lemma_source</span><span class="plain-syntax"> == </span><span class="constant-syntax">EG_NAME_LEMMASOURCE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">EG</span><span class="plain-syntax">) </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"a"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"b"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4_2">&#167;1.2.4.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_2_5" class="paragraph-anchor"></a><b>&#167;1.2.4.2.5. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Render the category gloss</span><span class="named-paragraph-number">1.2.4.2.5</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_glossed</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&amp;nbsp;&lt;span class=\"indexgloss\"&gt;%S&lt;/span&gt;"</span><span class="plain-syntax">, </span><span class="identifier-syntax">ic</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cat_glossed</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4_2">&#167;1.2.4.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_3" class="paragraph-anchor"></a><b>&#167;1.2.4.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Render the references</span><span class="named-paragraph-number">1.2.4.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">index_reference</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ref</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">ref</span><span class="plain-syntax">, </span><span class="reserved-syntax">index_reference</span><span class="plain-syntax">, </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">references</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">lc</span><span class="plain-syntax">++ &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">", "</span><span class="plain-syntax">);</span>

<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">volume_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ref</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">posn</span><span class="plain-syntax">.</span><span class="element-syntax">volume_number</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">markdown_item</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ref</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">posn</span><span class="plain-syntax">.</span><span class="element-syntax">latest</span><span class="plain-syntax">;</span>

<span class="plain-syntax">        </span><span class="identifier-syntax">IFM_example</span><span class="plain-syntax"> *</span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ref</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">posn</span><span class="plain-syntax">.</span><span class="element-syntax">example</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">E</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">S</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) </span><span class="identifier-syntax">S</span><span class="plain-syntax"> = </span><span class="identifier-syntax">E</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">cue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">S</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">E</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"unknown destination in index reference"</span><span class="plain-syntax">);</span>

<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">link_class</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I</span><span class="string-syntax">"indexlink"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">volume_number</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">link_class</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I</span><span class="string-syntax">"indexlinkalt"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">link</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">A</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">S</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="function-syntax">&lt;Str::len(S-&gt;</span><span class="identifier-syntax">stashed</span><span class="plain-syntax">); </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::get_at</span><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">stashed</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">':'</span><span class="plain-syntax">) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">Characters::isdigit</span><span class="plain-syntax">(</span><span class="identifier-syntax">c</span><span class="plain-syntax">)) || (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'.'</span><span class="plain-syntax">)) </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">link</span><span class="plain-syntax">, </span><span class="identifier-syntax">c</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">A</span><span class="plain-syntax"> = </span><span class="identifier-syntax">MarkdownVariations::URL_for_heading</span><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">S</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">link</span><span class="plain-syntax">, </span><span class="string-syntax">" "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">link</span><span class="plain-syntax">, </span><span class="string-syntax">"ex %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">E</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">insignia</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">EG</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">A</span><span class="plain-syntax"> = </span><span class="identifier-syntax">E</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">URL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">link_class</span><span class="plain-syntax">, </span><span class="identifier-syntax">A</span><span class="plain-syntax">, </span><span class="identifier-syntax">link</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">link</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4">&#167;1.2.4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_4_4" class="paragraph-anchor"></a><b>&#167;1.2.4.4. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Render the cross-references</span><span class="named-paragraph-number">1.2.4.4</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">LinkedLists::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cross_references</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">lc</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"; "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"span"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"indexsee\""</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"see "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">lc</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"also "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"span"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">index_cross_reference</span><span class="plain-syntax"> *</span><span class="identifier-syntax">xref</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">xref</span><span class="plain-syntax">, </span><span class="reserved-syntax">index_cross_reference</span><span class="plain-syntax">, </span><span class="identifier-syntax">il</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">cross_references</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">c</span><span class="plain-syntax">++ &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"; "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">index_lemma</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ils</span><span class="plain-syntax"> = </span><a href="7-id.html#SP2" class="function-link"><span class="function-syntax">IndexingData::retrieve_lemma</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="identifier-syntax">xref</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">P</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ils</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"no such xref"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">url</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">url</span><span class="plain-syntax">, </span><span class="string-syntax">"#l%d"</span><span class="plain-syntax">, </span><span class="identifier-syntax">ils</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">allocation_id</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">see</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><a href="7-it.html#SP5" class="function-link"><span class="function-syntax">IndexTerms::paraphrase</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">see</span><span class="plain-syntax">, </span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="identifier-syntax">xref</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">P</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"indexseelink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">url</span><span class="plain-syntax">, </span><span class="identifier-syntax">see</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">url</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">see</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP1_2_4">&#167;1.2.4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. Utilities.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexes::general_link</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">Indexes::general_link</span></span>:<br/><a href="7-gi.html#SP1_2_4_3">&#167;1.2.4.3</a>, <a href="7-gi.html#SP1_2_4_4">&#167;1.2.4.4</a>, <a href="7-gi.html#SP5">&#167;5</a><br/>In-App Manuals - <a href="7-im.html#SP5">&#167;5</a>, <a href="7-im.html#SP6">&#167;6</a><br/>Examples Index - <a href="7-ei.html#SP3_5">&#167;3.5</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">to</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">text</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::begin_link_with_class</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="identifier-syntax">to</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::end_link</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexes::escape_HTML_characters_in</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">Indexes::escape_HTML_characters_in</span></span>:<br/><a href="7-gi.html#SP1_2_4_2_1">&#167;1.2.4.2.1</a><br/>Examples Index - <a href="7-ei.html#SP3_5">&#167;3.5</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">text</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0, </span><span class="identifier-syntax">L</span><span class="plain-syntax">=</span><span class="identifier-syntax">Str::len</span><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">); </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">L</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::get_at</span><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">c</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="character-syntax">'\"'</span><span class="plain-syntax">:      </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">, </span><span class="string-syntax">"&amp;quot;"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="character-syntax">'&lt;'</span><span class="plain-syntax">:       </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">, </span><span class="string-syntax">"&amp;lt;"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="character-syntax">'&gt;'</span><span class="plain-syntax">:       </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">, </span><span class="string-syntax">"&amp;gt;"</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="character-syntax">'&amp;'</span><span class="plain-syntax">:</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::get_at</span><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">+1) == </span><span class="character-syntax">'#'</span><span class="plain-syntax">) { </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">, </span><span class="identifier-syntax">c</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">j</span><span class="plain-syntax"> = </span><span class="identifier-syntax">i</span><span class="plain-syntax">+1;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Characters::isalnum</span><span class="plain-syntax">(</span><span class="identifier-syntax">Str::get_at</span><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">j</span><span class="plain-syntax">))) </span><span class="identifier-syntax">j</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">j</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">i</span><span class="plain-syntax">+1) &amp;&amp; (</span><span class="identifier-syntax">Str::get_at</span><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">j</span><span class="plain-syntax">) == </span><span class="character-syntax">';'</span><span class="plain-syntax">)) { </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">, </span><span class="identifier-syntax">c</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">, </span><span class="string-syntax">"&amp;amp;"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">default:</span><span class="plain-syntax">        </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">, </span><span class="identifier-syntax">c</span><span class="plain-syntax">); </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Str::copy</span><span class="plain-syntax">(</span><span class="identifier-syntax">text</span><span class="plain-syntax">, </span><span class="identifier-syntax">modified</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">modified</span><span class="plain-syntax">)</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. Alphabet rows.</b></p>

<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexes::note_letter</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">Indexes::note_letter</span></span>:<br/><a href="7-gi.html#SP1_2">&#167;1.2</a><br/>Examples Index - <a href="7-ei.html#SP3_3">&#167;3.3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">compiled_documentation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">c</span><span class="plain-syntax"> - (</span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax">) </span><span class="character-syntax">'A'</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;26) </span><span class="identifier-syntax">cd</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">id</span><span class="plain-syntax">.</span><span class="element-syntax">letters_taken</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexes::alphabet_row</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">Indexes::alphabet_row</span></span>:<br/><a href="7-gi.html#SP1_2">&#167;1.2</a><br/>Examples Index - <a href="7-ei.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">compiled_documentation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cd</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">sequence</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">sequence</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span><span class="plain-syntax">:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;26; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">cd</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">id</span><span class="plain-syntax">.</span><span class="element-syntax">letters_taken</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span><span class="plain-syntax">: {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">faked</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;26; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">cd</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">id</span><span class="plain-syntax">.</span><span class="element-syntax">letters_taken</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">faked</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) { </span><span class="identifier-syntax">faked</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">; </span><span class="identifier-syntax">HTML_OPEN</span><span class="plain-syntax">(</span><span class="string-syntax">"p"</span><span class="plain-syntax">); }</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">singleton</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">singleton</span><span class="plain-syntax">, (</span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax">) (</span><span class="character-syntax">'A'</span><span class="plain-syntax">+</span><span class="identifier-syntax">i</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">HTML::anchor</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">singleton</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">singleton</span><span class="plain-syntax">)</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">faked</span><span class="plain-syntax">) { </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"p"</span><span class="plain-syntax">); }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">cd</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">id</span><span class="plain-syntax">.</span><span class="element-syntax">use_simplified_letter_rows</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_OPEN</span><span class="plain-syntax">(</span><span class="string-syntax">"p"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"table"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"fullwidth\""</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_OPEN</span><span class="plain-syntax">(</span><span class="string-syntax">"tr"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"td"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"letterinrow\""</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#A"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"A"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#B"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"B"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#C"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"C"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#D"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"D"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#E"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"E"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#F"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"F"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#G"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"G"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#H"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"H"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#I"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"I"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#J"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"J"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#K"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"K"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#L"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"L"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#M"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"M"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#N"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"N"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#O"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"O"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#P"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"P"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#Q"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Q"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#R"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"R"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"S"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#T"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"T"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#U"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"U"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#V"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"V"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#W"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"W"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#X"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"X"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#Y"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Y"</span><span class="plain-syntax">); </span><span class="named-paragraph-container code-font"><a href="7-gi.html#SP5_1" class="named-paragraph-link"><span class="named-paragraph">Between</span><span class="named-paragraph-number">5.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="7-gi.html#SP2" class="function-link"><span class="function-syntax">Indexes::general_link</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"letterlink"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"#Z"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Z"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">cd</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">id</span><span class="plain-syntax">.</span><span class="element-syntax">use_simplified_letter_rows</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"p"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"td"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"tr"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"table"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5_1" class="paragraph-anchor"></a><b>&#167;5.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Between</span><span class="named-paragraph-number">5.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">cd</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">id</span><span class="plain-syntax">.</span><span class="element-syntax">use_simplified_letter_rows</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">" / "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"td"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"td"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"letterinrow\""</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="7-gi.html#SP5">&#167;5</a> (25 times).</li></ul>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>This is mainly used for the typographically dramatic link letters A, B, C, ...
but can also make fatter typographically dramatic headings, if it's stretched
in width and a longer text is supplied.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Indexes::majuscule_heading</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">Indexes::majuscule_heading</span></span>:<br/><a href="7-gi.html#SP1_2_1">&#167;1.2.1</a><br/>Examples Index - <a href="7-ei.html#SP3_3">&#167;3.3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">compiled_documentation</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cd</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">display_text</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">single_letter</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">cd</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">id</span><span class="plain-syntax">.</span><span class="element-syntax">use_simplified_letter_rows</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">single_letter</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">HTML::begin_div_with_class_S</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"majuscule"</span><span class="plain-syntax">, </span><span class="identifier-syntax">__FILE__</span><span class="plain-syntax">, </span><span class="identifier-syntax">__LINE__</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">HTML::begin_div_with_class_S</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"stretchymajuscule"</span><span class="plain-syntax">, </span><span class="identifier-syntax">__FILE__</span><span class="plain-syntax">, </span><span class="identifier-syntax">__LINE__</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_OPEN_WITH</span><span class="plain-syntax">(</span><span class="string-syntax">"span"</span><span class="plain-syntax">, </span><span class="string-syntax">"class=\"majusculelettering\""</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">display_text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"span"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML::end_div</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&lt;b&gt;%S&lt;/b&gt;"</span><span class="plain-syntax">, </span><span class="identifier-syntax">display_text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="7-imn.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-sm.html">1</a></li><li class="progresschapter"><a href="2-gnr.html">2</a></li><li class="progresschapter"><a href="3-bg.html">3</a></li><li class="progresschapter"><a href="4-em.html">4</a></li><li class="progresschapter"><a href="5-es.html">5</a></li><li class="progresschapter"><a href="6-st.html">6</a></li><li class="progresscurrentchapter">7</li><li class="progresssection"><a href="7-tm.html">tm</a></li><li class="progresssection"><a href="7-eip.html">eip</a></li><li class="progresssection"><a href="7-ti.html">ti</a></li><li class="progresssection"><a href="7-tc.html">tc</a></li><li class="progresssection"><a href="7-dc.html">dc</a></li><li class="progresssection"><a href="7-dr.html">dr</a></li><li class="progresssection"><a href="7-im.html">im</a></li><li class="progresssection"><a href="7-mrp.html">mrp</a></li><li class="progresssection"><a href="7-id.html">id</a></li><li class="progresssection"><a href="7-it.html">it</a></li><li class="progresssection"><a href="7-il.html">il</a></li><li class="progresssection"><a href="7-imn.html">imn</a></li><li class="progresscurrent">gi</li><li class="progresssection"><a href="7-ei.html">ei</a></li><li class="progressnext"><a href="7-ei.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

